<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>嘎嘎切换背景颜色</title>
    <style>
        input{
            -webkit-appearance:none;
            width: 20px;
            height: 20px;
        }
        div{
        width: 100px;
        height: 100px;
        border: solid;
        background-color: red;
        }
        input:checked{
            border-radius:10px;
        }
        /*用来设置点击lanse的圆形后改变边框背景*/
        .lanse:checked ~div{
            background-color: royalblue;
        }
        .lanse{
            background-color: blue;
        }
    </style>
</head>
<body>
  <input type="radio"  class="lanse">
  <div>嘎字变颜色</div>
</body>
</html>